<?php
include("config.php");
include_once('connection/connection.php');
$loc_id=$_REQUEST['addloc'];


$reference_id=$_REQUEST['referenceId'];

  if(isset($_REQUEST['submit'])){
  		mysql_query("INSERT INTO tbl_dtls_q1_psp VALUES('','$_REQUEST[loc_id]','$_REQUEST[taps]','$_REQUEST[location]','$_REQUEST[latitude]','$_REQUEST[longitude]','$_REQUEST[att_glr]','$_REQUEST[att_cwt]','$_REQUEST[scst]')");
   header("Location:q1_rwss_edit.php");
  }
?>
<script type="text/javascript" src="js/jquery.js"></script>

<script language="javascript">
function setReadOnly22(valobj)
{
		//document.getElementById('household'+obj).style.backgroundcolor="#eeeeee";
		//document.getElementById('population_sc1').readonly=1;
		//document.getElementById('population_sc1').value="Not Applicable";
		document.getElementById('yeildMin').disabled=true;
		document.getElementById('yeildMax').disabled=true;
		document.getElementById('waterMin').disabled=true;
		document.getElementById('waterMax').disabled=true;
		//document.getElementById('source'+obj).disabled=true;
		document.getElementById('source_status').value="defunct";
   
}
function setEnable22(valobj)
{

		//document.getElementById('population_sc1').style.backgroundcolor="#ffffff";
		//document.getElementById('population_sc1').readonly=0;
		//document.getElementById('population_sc1').value="";
		document.getElementById('yeildMin').disabled=false;
		document.getElementById('yeildMax').disabled=false;
		document.getElementById('waterMin').disabled=false;
		document.getElementById('waterMax').disabled=false;
		//document.getElementById('source'+obj).disabled=false;
		document.getElementById('source_status').value="operation";
	
}

</script>
 <div class="section_format">
  <form action="psprwss_add.php" method="post" name="sec5" id="sec5" >
   	  <input type="hidden" id="loc_id" name="loc_id" value="<?php echo $loc_id; ?>">
	
   <div style="height:30px" align="center"><?php echo $reference_id;?></div>
   <table border="1">
    <tr>
      <td colspan="2">&nbsp;<b>Public Stand Post (PSP)</b>&nbsp;</td>
      </tr>
   
	  
	  <tr>
      <td width="138">&nbsp;<b>Taps/PSP Nos.</b></td>
      <td width="144">&nbsp;
	<input type="text" name="taps" id="taps" onBlur="int(this);" />
		</td>
      </tr>
	   <tr>
      <td>&nbsp;<b>Location</b></td>
      <td>&nbsp;
		<input type="text" name="location" id="location" />
		</td>
      </tr>
	   <tr>
      <td>&nbsp;<b>Latitude</b></td>
      <td>&nbsp;
		<input type="text" name="latitude" id="latitude" onBlur="float1(this,20,32);" />
		</td>
      </tr>
	   <tr>
      <td>&nbsp;<b>Longitude</b></td>
      <td>&nbsp;
		<input type="text" name="longitude" id="longitude" onBlur="float1(this,67,80);" />
		</td>
      </tr>
	  <tr>
	  <td>&nbsp;<b>Attached with (GLR)</b></td>
	 <td>&nbsp;<input type="radio" name="att_glr" id="att_glr" value="YES" />Yes&nbsp;<input type="radio" name="att_glr" id="att_glr" value="NO" />No</td>
	  </tr>
	    <tr>
	  <td>&nbsp;<b>Attached with CWT (Cattle water trough)</b></td>
	 <td>&nbsp;<input type="radio" name="att_cwt" id="att_cwt" value="YES" />Yes&nbsp;<input type="radio" name="att_cwt" id="att_cwt" value="NO" />No</td>
	  </tr>
    <tr>
	  <td>&nbsp;<b>In SC/ST Basti</b></td>
	 <td>&nbsp;<input type="radio" name="scst" id="scst" value="YES" />Yes&nbsp;<input type="radio" name="scst" id="scst" value="NO" />No</td>
	  </tr>

	  
	  <tr>
	    <td colspan="2" align="center"><input type="submit" value="ADD PSP" name="submit" style="font-size: 8pt; font-family: Verdana; border-style: solid; border-width: 1px; font-weight:bold; background:#666666; color:#FFFFFF; width:140px; height:30px" onClick="view_validate()"></td>
  </tr>
  </table>
  </form>
  </div>
 